package com.fc.happyteam.utils.validator.dictionary;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * Created by futurecreative on 2017/7/28.
 */
@Constraint(validatedBy = DictionaryValidator.class) //具体的实现
@Target( { java.lang.annotation.ElementType.METHOD,
        java.lang.annotation.ElementType.FIELD })
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Documented
public @interface Dictionary {
    String message() default "Not found in dictionary";

    String[] codes();

    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
